Gareth Bale's header secured Wales' victory over Cyprus which leaves them one win away from securing European qualification.