upgrading uglify to 2.2.5, optimist to 0.3.5, upgrading source-map to 0.1.7, and adding amdefine

Fixes #337