Influence of strain on space-charge distribution at ferroelectric thin-film free surfaces