only use syncfs if it is available
Merge pull request #1381 from devoncarew/devoncarew_use_syncfs

only use syncfs if it is available