fixed detect by headers in c++