updated bad function formatting

I did a find and replace to fix all instances of `function (` across all of the src/library_*.js files.