Injection-controlled size effect on switching of ferroelectric thin films