You can determine the supply voltage like so: Supply Voltage Measurement | Blinkenlight. Once you know the supply voltage you can set the reference to the supply voltage again. Then measure your resistor. It is advicable to wait some cycles after switching the reference. It is also a good idea to switch back and forth between measurements and to smooth the results.