Implemented a different #1699 workaround for v3.1 to handle jQuery Mobile being loaded at the end of the body element

Implemented a different #1699 workaround for v3.1 to handle jQuery Mobile being loaded at the end of the body element versus being loaded through pe-ap.js. jQuery Mobile being loaded at different stages has a significant impact on how to get the initial page scroll value.