Light-based positioning systems (LPS) are gaining significant attention as a means to provide localization with cm accuracy. Many of these systems estimate the object position based on the received light intensity, and work properly in 'ideal' environments such as large open spaces without obstructions around the light-emitting diode (LED) and the receiver, where reflections are negligible. In more dynamic environments, such as indoor spaces with moving people and city roads with moving vehicles, materials cause a wide variety of reflections. This causes variations in the received light intensity and, as a consequence, gross localization errors in LPS. We propose a new multipath detection technique for improving LPS that does not require the knowledge of the channel impulse response and then, it is suited to be implemented in low-cost positioning receivers that use a single-pixel photodetector. To develop our technique, we (i) analyze the statistical properties of non-line-of-sight (NLOS) components, (ii) develop an automated testbed to study the reflections of different types of surfaces and materials, and (iii) design an algorithm to remove the NLOS components affecting the positioning estimate. Our experimental evaluation shows that, in complex environments, our methodology can reduce the localization error using LEDs up to 93%.