Change camelCase to underscore

That way it's consistent with the rest of the slash-code. Thanks to
@charliesome for the suggestion.
Add const qualifier to resolve warning.

Thanks to @charliesome
Use the check_lib helper instead of a manual check
Remove useless condition