fix compile errors (on clang 3.2)