Fix debug build errors

-Removed optimization
-Linked with Static debug RTL
- Define _DEBUG