Fixes for OS X:
- set profile to Core
- use texture instead of texture2D in shared