Make post.php compatable with PHP 5.3x

Compatible with earlier versions of PHP. This should work on 5.4 too, but I haven't tested it.