support for safe curl uploads which is bundled with php 5.5