Removed extra link flags.
Fixed runtime error in the hook callback log statement.
Fixed function definitions for dlsym().