configure: don't use SDL.h in check_func_headers when checking for SDL2

check_func_headers() defines a main() function, which clashes with a
redefinition done by said SDL header. Check for SDL_PollEvent using
SDL_events.h only instead, where the redefinition doesn't happen.

Fixes a regression since d03c39b46b21c893d6549a532289b7fb9935b3fc.

Tested-by: RiCON
Signed-off-by: James Almer <jamrial@gmail.com>
