PIVOT-974: Fix BXMLSerializer to correctly deal with the new Java 8 Nashorn script engine by doing two things: 1) Accessing global variables needs to be done through the "nashorn.global" object. 2) The "nashorn:mozilla_compat.js" script needs to be loaded first before any other scripts are executed. This change implements these two fixes.