Critical current in planar SNS Josephson junctions