Test ftruncate on file stream only with PHP ≥ 5.4.