Fix getopts detection