Some compatibiliy tweaks

* Prioritize syntax-begin-function over font-lock-beginning-of-syntax-function.
* Check if syntax-propertize-function is bound. It isn't in Emacs 23.