Let ABCDEFGH be a cube and M the midpoint of GH. It is known that the distance between the lines BM and AD is a[tex]\sqrt{5}[/tex]. What is the length of AB?