Fixed platform architecture detection. Closes #588.