tested up to 4.0
Fixed some errors that sometimes causes header already sent errors

git-svn-id: https://plugins.svn.wordpress.org/its-mobile-lite/trunk@1004896 b8457f37-d9ea-0310-8a92-e5e31aec5664