I tried to align the IR receiver with the window as much as possible, but no noticeable improvement was seen. So, I replaced the IR receiver with Vishay TSOP34438, which is pin compatible with the original. The legs of the receiver need to be bent so the receiving dome touches the IR window when the board is mounted on the case. Now I can point the remote at the ceiling and the box still recognizes the signal with no problem - SUCCESS.
By the way, the IR remote control can be easily customized by editing /system/etc/remote.conf which has a mapping table from IR code to Linux key code (not Android key code!). Here is a nice Linux key code table along with Android key code. If remote.conf keeps being overwritten by the default one at reboot, make it readonly with chmod so it won't be overwritten.
Motherboard with the new IR receiver
New IR receiver
Original IR receiver