If you have a green card you can avoid this by signing up for Global Entry[1]. Then you can avoid customs lines and just swipe your card at the kiosk - enter the country without ever talking to anyone. As an extra benefit the kiosk is always empty so you are through in minutes... hmm maybe I shouldn't be spreading the word about this :)
[1] http://www.globalentry.gov/