Avoid filter_input for compatibility with PHP < 5.2.