Fixed issue with ftruncate not being defined.