Search for promptly produced heavy quarkonium states in hadronic Z decays