Fixed an error in the browser support function when the Gallery script is included in the document head.