cmake: fix finding library using pkgconfig

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>