A stand-in for the syntax-propertize logic that should work on Emacs 23.