Magnetic Navigation using Attitude-Invariant Magnetic Field Information for Loop Closure Detection