Replaced os.sync with a libc syscall since os.sync is only supported
Python 3.3 upward.