configure: Move substitution of LINKLIB to later

This was happening before the check.