ac Josephson effect in finite-length nanowire junctions with Majorana modes.