Wrong Orientation on Samsung Galaxy SI and SII

Wrong Orientation on Samsung Galaxy SI and SII

on Samsung Galaxy S1 and S2 the orientation reported by jQuery mobile is sometimes inverted.
Mostly when the browser cache is cleared before WebApp start, the device reports a window.innerHeight of only 229px, if the orientationChange event is triggerd in document.ready().
So "initial_orientation_is_landscape" evolves to true and the "portrait_map" is inverted in jQuery mobile...
is there a possibility/workaround to force these Samsung devices to report the correct window.innerHeight in document.ready() ?