Sixteen Turkish construction workers kidnapped a month ago in the Iraqi capital Baghdad have been freed, Turkey's prime minister says.