Tunable effective g factor in InAs nanowire quantum dots