Fixed bug where JavaScript API wouldn't be initialized if no file
was specified and defaults.xml didn't exist.