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