Distinguishing between optical coherent states with imperfect detection (9 pages)