Black Stars edge out Wanderers in a thriller