moved getContext inside modernizr check