Re-add specialize pragmas
Use #ifdef to regain base 4.2/4.3 compatability.