Remove PHP4 based checks, and move to filter_var.

PHP4 has been dead for a long time, we can safely use filter_var.
Merge pull request #205 from jvhaarst/master

Remove PHP4 based checks, and move to filter_var.