fixed compile issue for tutorials under Mac OS X