Makefile: Fixes VERSIONED_SO check when VERSION_STYLE=custom.