add optional AMD style output, and bump version to 0.5.1
Merge remote-tracking branch 'origin/add_requirejs'