Merge pull request #1513 from nykula/master

Use st_mtim if st_mtime is macro, fix #1510