Fix php 5.4 file upload

Summary: Fix php 5.4 file upload

Test Plan: run tests with php54