Add workaround for php bug 64634 in copy