Added support for gcc compiler and cmake. Minor changes.