fixed jsheader.py for cmake
mark error_codes.cpp as generated earlier
fixed get_filename_component for cmake <2.8.11
fixed compile on systems without pcre