Update amf.c

PHP 5.4 compatibility + minor bug.