Cosmological string solutions in 4 dimensions from 5d black holes