hostname module fix for RHEL5

Apply the same change as https://github.com/hnakamur/ansible-playbooks/pull/2.