fix error where build tries to access window variable
more work on build of jquery test layer, still not working