cmake: fix dodgy findnetcdf.cmake

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
cmake: lua should use the cmake variables to link with readline and curses

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