add try/catch around accesses of window.API

Firefox's cross-site scripting security throws a "permission denied" error when trying to access properties of the parent window, and it belongs to a different domain than the child.
For example, if I have a page at mysite.com containing a link to a SCORM package at theirsite.com which opens in a new window, the SCORM wrapper loaded at theirsite.com will cause a "permission denied" error when it tries to find the API through window.parent.
This code catches that error and adds it to the debug trace but otherwise fails silently, the same as if both pages are  on the same domain and the API isn't present.