Fix compile error.
Fix unittest, by removing recursive call.
Add support for gcc 4.6 and ccache.