No secure ad-hoc network with Yosemite?
A possible solution would be to use the Imac to share a network conenction over wifi which in effect also creates a hotspot. 

In preferences go to sharing. Pick network sharing in the list. It has options to set a wifi password and you can then choose to share internet from something to wifi. 

Unforetuntely apple "fixed" it in mountain lion or lion that you can no longer share if you arent actually connected to another device. 
Before I could make a hotspot using ethernet as my share choice even if ethernet wasnt plugged in. Now it no longer will create the hotspot if not actually connected.  

EDIT: I recently found away around this issue and the answer is listed here