New York detective killed by 'friendly fire' while responding to robbery