Forced check of media query change on orientation change

Hey, on our project we have been investigating the problem with mobile phones were not able to detect orientation change while it was clearly added to CSS. We came up to solution below which I would like to contribute.