added extern C for cpp in headers