Added finer control over inclusion of orientation related code; this gets rid of qml runtime error