Added window.orientation; close #316