Use a better mechanism for checking for functions which require libraries+headers