Work around 1.8.7 file api differences.