Use S_ISREG(), since S_IFMT and S_IFREG are apprarently missing on some