define S_ISREG if not already defined

 * required for VC80 with Microsoft SDK 7.1
Merge pull request #2 from andrei-diaconu/master

I had to define S_ISREG in order to compile on my machine