added PHP 5.6 compatibility for async upload