build: Make it friendly for cross compiling

abstract pkgconfig calls to variables

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Fix erros found with gcc 4.8

Errors and warnings like below pop up with gcc 4.8

grabber.c:60:53: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings]
grabber.c:92:53: error: invalid conversion from 'void*' to 'buffer*'
[-fpermissive]

Signed-off-by: Khem Raj <raj.khem@gmail.com>