fixed build problems with gcc4.6