SDL_getenv not working

I have been trying to get SDL to work with TSLIB as the SDL_MOUSEDRV.
After some investigation, I found that

SDL_getenv(“SDL_MOUSEDRV”) in FB_OpenMouse (in
src/video/fbcon/SDL_fbevents.c) was returning null. I wrote a simple
program that did the same, and it correctly returned a string with
"TSLIB" in it.

Does this have anything to do with the fact that I am using a shared
library version of SDL and if so, why can’t it access the process’
environment variables? (coz as far as I could see, SDL_getenv was
being #define’ed to getenv() ).