API detection changes, fixes #197