Include #ifndef routine in auto generated header.
Also fixed various compile problem on CYGWIN.
Merge pull request #60 from sunyc/master

Fix various CYGWIN problem, disable optimize and added warning.