Fixed build errors/warnings for gcc 4.7.2.
Merge pull request #23 from alexfru/master

Smaller C: fixes, improvements