fix query 1.8 compatibility, switch to uglifyjs