Check if running as a plugin, and set host accordingly
Better detect prefixed paths when used as a plugin