fixes for accelerometer and orientation. added magnetic direction (heading) to orientation object
fix for demo html file