check library versions against header symbols in static initialization function

fixes #580